package org.geektime.task.automybatisspringbootstarter.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 数据源属性配置类:
 * 对于属性这种配置类,有2种自动注入的方式
 * 1：内部使用@Component注解
 * 2:外部使用@EnableConfigurationProperties注解
 */
@ConfigurationProperties(prefix = "mybatis.datasource")
public class DataSourceProperties {

    private String jdbcUrl;

    private String driverClass;

    private String username;

    private String password;

    public String getDriverClass() {
        return driverClass;
    }

    public void setDriverClass(String driverClass) {
        this.driverClass = driverClass;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getJdbcUrl() {
        return jdbcUrl;
    }

    public void setJdbcUrl(String jdbcUrl) {
        this.jdbcUrl = jdbcUrl;
    }
}
